x86/IO-APIC: fix setup of Xen internally used IRQs
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Nov 2015 16:04:10 +0000 (17:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Nov 2015 16:04:10 +0000 (17:04 +0100)
commit1126b40892ab56cb13c3cae5822bf3a18a689ffb
treed053bc30b40a7f036ce51c666c1671f322dce539
parent5ab6654cf0f2a90b23d5ab714fa49ae038d21e17
x86/IO-APIC: fix setup of Xen internally used IRQs

..., i.e. namely that of a PCI serial card with an IRQ above the
legacy range. This had got broken by the switch to cpumask_any() in
cpu_mask_to_apicid_phys(). Fix this by allowing all CPUs for that IRQ
(such that __setup_vector_irq() will properly update a booting CPU's
vector_irq[], avoiding "No irq handler for vector" messages and the
interrupt not working).

While doing this I also noticed that io_apic_set_pci_routing() can't
be quite right: It sets up the destination _before_ getting a vector
allocated (which on other than systems using the flat APIC mode
affects the possible destinations), and also didn't restrict affinity
to ->arch.cpu_mask (as established by assign_irq_vector()).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/io_apic.c
xen/arch/x86/smpboot.c